package 懒汉单例;

public class demo {

    private static demo instance;

    private demo() {
    }

    public static demo getInstance(){
        if(instance==null){
            instance = new demo();
        }
        return instance;
    }
}
